package com.mentalhealthplatform.global.rbac.repository;

import com.mentalhealthplatform.global.rbac.model.ButtonComponent;
import com.mentalhealthplatform.global.rbac.model.Menu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;
import java.util.Set;

@Repository
public interface ButtonComponentRepository extends JpaRepository<ButtonComponent, Long> {

    Optional<ButtonComponent> findByIdentifier(String identifier);

    Set<ButtonComponent> findByParentMenu(Menu menu);

}
